<template>
  <div class="home">
    <a href="JavaScript:" :class="[{current:curIdx === 0}]" @click="changTab(0)">选项1</a>
    <a href="JavaScript:" :class="[{current:curIdx === 1}]" @click="changTab(1)">选项2</a>
    <a href="JavaScript:" :class="[{current:curIdx === 2}]" @click="changTab(2)">选项3</a>
    <a href="JavaScript:" :class="[{current:curIdx === 3}]" @click="changTab(3)">选项4</a>
  </div>
</template>
<script>
export default {
  props: {
    curIdx: Number
  },
  data() {
    return {
      current:''
    }
  },
  methods: {
    changTab(index) {
      // console.log(index);
      this.$emit('changTab', index)
    }
  },
}
</script>

<style lang="scss">
a{
  margin-left: 10px;
}
.current {
  text-decoration: none;
  color: #000;
}
</style>